//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dict.comment.domain.entity.EventWaring;
import com.entry.WebSocketCan;
import com.mapper.EventWaringMapper;
import com.service.EventWaringService;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;


@Service
public class EventWaringServiceimpl extends ServiceImpl<EventWaringMapper, EventWaring> implements EventWaringService {

    @Autowired
    private EventWaringMapper eventWaringMapper;

    public Integer saveEventWaring(EventWaring eventWaring) {
        try {
           eventWaringMapper.saveEventWaring(eventWaring);
            return 0;
        } catch (Exception var3) {
            return 1;
        }
    }

    public List<EventWaring> getAllEventWaring(EventWaring eventWaring) {
        List<EventWaring> list = eventWaringMapper.selectAll(eventWaring);
        return list;
    }

    public void updateWaring(EventWaring eventWaring) {
        eventWaringMapper.updateEventWaring(eventWaring);
    }

    public List<EventWaring> selectByLabel(EventWaring eventWaring) {
        List<EventWaring> list = eventWaringMapper.selectByLabel(eventWaring);
        return list;
    }

    @Override
    public List<EventWaring> getWarningTop() {
        return eventWaringMapper.getWarningTop();
    }

    @Override
    public List<EventWaring> getWarningTop5() {
        return eventWaringMapper.getWarningTop5();
    }
    @Override
    public EventWaring getOneAlgor(Integer id) {
       EventWaring eventWaring= eventWaringMapper.getOneAlgor(id);
        return eventWaring;
    }
    @Override
    public WebSocketCan getWeb(WebSocketCan eventWaring) {
//        EventWaring eventWaring=
        return eventWaringMapper.getWeb(eventWaring);

    }
}
